var mysql=require("mysql");
var db=require("../config/db.js");
var connection = mysql.createConnection(db.dbconfig);
    connection.connect(function(err){
        if(err){
            console.log("databases connect failed");
        }
    });
    connection.on("success",function(msg){
        console.log("databases is connected");
    })
    connection.on("error",function(err){
          console.log(err);
    })
module.exports=connection;



